
let TempState,TempInfo,MonthDays,YearDays;
let todays,weeks,months,years,allyears;
layui.config({
    version:'1510164124181'
}).use(['form', 'laypage', 'layer', 'element'],function(){
    form = layui.form;
    layer = layui.layer;
    $ = layui.jquery;
    laypage = layui.laypage;//分页
    element = layui.element; //元素操作

    TempState=$("body").attr("data-id");
    TempInfo=$("body").attr("data-info");

    if(TempInfo=='shopcart'){
        SelectCollectList(pageNo,pageRecords,TempState);
    }else if(TempInfo=='orderlist'){
        SelectOrderList(pageNo,pageRecords,TempState);
    }else{
        SelectProInfo();
    }


    MonthDays=SelectThisDays();
    YearDays=SelectYearInfo();//8年


    let RightTargetInfo = $.session.get("RightTargetInfo");
    $("header .title[data-info="+RightTargetInfo+"]").show();

});



function SearchInfo(){
    pageNo=1;
    inituserdata();
}

//分页
function page(){
    laypage.render({
        elem: 'page' //注意，这里的 test1 是 ID，不用加 # 号
        ,count:totalRecords //数据总数，从服务端得到
        ,curr: pageNo //获取起始页 location.hash.replace('#!fenye=', '')
        ,hash: 'fenye' //自定义hash值
        ,layout: ['count', 'prev', 'page', 'next', 'skip']
        ,jump: function(obj, first){
            //首次不执行
            if(!first){
                pageNo = obj.curr;
                pageRecords = obj.limit;// 当前页面记录数
                inituserdata();
            }
        }
    });
}



